import {createRouter,createWebHashHistory} from 'vue-router'
export default createRouter({
    /* 
    createWebHashHistory:hash模式,
    createWebHistory:history模式
    */
    history:createWebHashHistory(),
    routes:[
        {
            path:'/',
            name:'main',
            component:()=>import('../views/main.vue'),
            redirect: '/home', // 添加重定向到首页
            children:[
                {
                    path:'/home',
                    name:'home',
                    component:()=>import('../views/home.vue'),
                },
                {
                    path:'/hero',
                    name:'hero',
                    component:()=>import('../views/hero.vue'),
                },
                {
                    path:'/equip',
                    name:'equip',
                    component:()=>import('../views/equip.vue'),
                },
                {
                    path:'/bond',
                    name:'bond',
                    component:()=>import('../views/bond.vue'),
                },
                {
                    path:'/rune',
                    name:'rune',
                    component:()=>import('../views/rune.vue'),
                }
            ]
        },
        {
            path:'/herodetail',
            name:'herodetail',
            component:()=>import('../views/herodetail.vue'),
        },
        // 添加装备详情页路由
        {
            path:'/equipdetail',
            name:'equipdetail',
            component:()=>import('../views/equipdetail.vue'),
        },
        // 添加符文详情页路由
        {
            path:'/runedetail',
            name:'runedetail',
            component:()=>import('../views/runedetail.vue'),
        },
        // 添加羁绊详情页路由
        {
            path:'/bondetail',
            name:'bondetail',
            component:()=>import('../views/bondetail.vue'),
        },
       
    ],
})
